use axum::Router;
use tokio::net::TcpListener;
use tower_http::services::{ServeDir, ServeFile};

#[tokio::main]
async fn main() {
    let app = Router::new().fallback_service(
        ServeDir::new("dist").not_found_service(ServeFile::new("dist/index.html")),
    );
    let listener = TcpListener::bind("0.0.0.0:80").await.unwrap();
    axum::serve(listener, app).await.unwrap();
}
